package org.nlp2rdf.navigator.benchmark;

import java.util.Arrays;
import java.util.List;

/**
 * Created by Claus Stadler
 * Date: Oct 25, 2010
 * Time: 12:16:15 AM
 */
public class CompoundPhaseReconfigurator
        implements IPhaseReconfigurator
{
    private List<IPhaseReconfigurator> reconfigurators;

    public CompoundPhaseReconfigurator(IPhaseReconfigurator ... reconfigurators)
    {
        this.reconfigurators = Arrays.asList(reconfigurators);
    }

    public CompoundPhaseReconfigurator(List<IPhaseReconfigurator> reconfigurators)
    {
        this.reconfigurators = reconfigurators;
    }

    public void reconfigure(int phaseId) {
        for(IPhaseReconfigurator item : reconfigurators) {
            item.reconfigure(phaseId);
        }
    }
}
